
#include "mainwindow.h"
#include <QApplication>
#include <WindowsServiceHelper.h>
#include <QTranslator>
#include <QTextCodec>
#include <QSplashScreen>
#include "BingWallpaperService.h"
#include "qmlapplicationviewer.h"
#include <QGraphicsView>
#include <QDeclarativeContext>
#include <FileHelper.h>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    MainWindow w;

    QTranslator translator;
    bool b = translator.load("zh_cn.qm");
    a.installTranslator(&translator);


    //    QmlApplicationViewer viewer;
    //    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    //    viewer.setMainQmlFile(QLatin1String(":/qml/MainPage.qml"));
    //    viewer.showExpanded();

//    QDeclarativeView view;
//    view.setSource(QUrl("qrc:/qml/MainPage.qml"));
//    //Boderless
//    view.setWindowFlags(Qt::FramelessWindowHint);
//    view.rootContext()->setContextProperty("mainWindow",&view);
//    view.show();

    w.show();
    return a.exec();
}
